//2009/08/26 13:49:33
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class DownloadingFiles
{
public:
    double actualTime(vector <string> tasks)
    {
		vector<pair<int, int> > v;
		for(int i=0; i<tasks.size(); i++)
		{
			stringstream s(tasks[i]);
			int a, b;
			s >> a >> b;
			v.push_back(make_pair(b, a));
		}
		sort(v.begin(), v.end());
		double time = 0.0;
		int speed = 0;
		for(int i=0; i<v.size(); i++)
		{
			speed += v[i].second;
			time += (1.0 * v[i].first - time) * v[i].second / (1.0 * speed );
		}
		return time;
    }
};
